package action;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;
import java.util.List;

import dao.*;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author Administrator
 *
 */

public class ShowStatusAction  extends ActionSupport{
	private List solutionList;
	
	public void setSolution(List solutionlist) {
		this.solutionList = solutionlist;
	}
	public List getSolution() {
		return solutionList;
	}


	@Override
	public String execute() throws Exception{
		ActionContext ac = ActionContext.getContext();        
		HttpServletRequest request=(HttpServletRequest)ac.get(ServletActionContext.HTTP_REQUEST);
		SolutionDAO dao=new SolutionDAO();   
        solutionList=dao.findAll();	
        request.setAttribute("solutionList",solutionList);
        System.out.println("solutionList="+request.getAttribute("solutionList"));
		return SUCCESS;
			
	}












	
}